function ctrlInitArrowFormCode(context,selector, data){
	
	var textarea = $(selector+"-area");
	
	function initCodeEditor(){
	    var editor = ace.edit(selector.replace("#",""));
	    editor.setTheme("ace/theme/eclipse");
	    var mode = require("ace/mode/"+data.mode).Mode;
	    editor.getSession().setMode(new mode());
	    editor.getSession().on('change', function(){
	    	textarea.val(editor.getSession().getValue());
	    	
	    });
	}	
	
	
	if( $(selector).is("visible") ){
		initCodeEditor()
	}else{
		var interval = null;
		function foo(){
			if($(selector).is(':visible')){
				initCodeEditor();
				clearInterval(interval);
			}
		} 
		interval = window.setInterval(foo, 200);
	}

		
}